/*通话套餐类 特征：通话时长、短信条数、每月资费 行为: 显示所有套餐信息*/

import java.math.BigDecimal;

public class PhoneCallPlan extends PlanAbstract implements CallInterface {
    private double durationOfCall; // 通话时长
    private int numMessages; // 短信条数
    //private BigDecimal costPerMonth; //每月资费

    public PhoneCallPlan(double durationOfCall, int numMessages, BigDecimal costPerMonth) {
        super(costPerMonth);
        this.durationOfCall = durationOfCall;
        this.numMessages = numMessages;
    }

    public double getDurationOfCall() {
        return durationOfCall;
    }

    public int getNumMessages() {
        return numMessages;
    }

    @Override
    public void PlanInfo() {
        System.out.println("语音套餐详情：");
        System.out.println("通话时长" + durationOfCall + "分钟");
        System.out.println("短信条数：" + numMessages + "条");
        System.out.println("每月资费：" + getCostPerMonth() + "元");
    }

    @Override
    public void CallService(double durationOfCall, SIMCard Card) {
        Card.show();
        System.out.println("通话了" + durationOfCall + "分钟");
    }
}
